﻿package mortal.game.net.broadCast
{
    import Framework.MQ.*;
    import com.gengine.core.call.*;

    public class BroadCastManager extends Object
    {
        private var _caller:Caller;
        private static var _instance:BroadCastManager;

        public function BroadCastManager()
        {
            this._caller = new Caller();
            return;
        }// end function

        public function call(param1:Object, param2:MessageBlock) : void
        {
            this._caller.call(param1, param2);
            return;
        }// end function

        public function registerCall(param1:BroadCastCall) : void
        {
            this._caller.addCall(param1.type, param1.call);
            return;
        }// end function

        public function removeCall(param1:BroadCastCall) : void
        {
            this._caller.removeCall(param1.type, param1.call);
            return;
        }// end function

        public static function get instance() : BroadCastManager
        {
            if (_instance == null)
            {
                _instance = new BroadCastManager;
            }
            return _instance;
        }// end function

    }
}
